package com.banmoon.singleton;

/**
 * 双重检查
 */
public class Singleton06 {

    private Singleton06() {
    }

    private static volatile Singleton06 instance;

    public static Singleton06 getInstance(){
        if(instance==null){
            synchronized(Singleton06.class){
                if(instance==null)
                    instance = new Singleton06();
            }
        }
        return instance;
    }

}
